// 活动中心相关类型（依据 api.json）

export interface Active {
  _id: string
  name?: string | null
  status?: string | null
  progress?: string | null
  price?: number | null
  tag?: string[] | null
  cover?: string | null
  use_num?: number | null
  createBy?: string | null
  createdAt: string
  updatedAt: string
  // 详情接口新增：奖池信息
  pool?: ActivePoolItem[] | null
}

// 奖池条目（详情接口中返回）
export interface ActivePoolItem {
  draw: {
    _id: string
    name?: string | null
    subTitle?: string | null
    pic?: string[] | null
    price: number
    createBy?: string | null
    createdAt: string
    updatedAt: string
  }
  total: number
  consumed: number
  probability: number
  guarantee: number
}

export interface ActiveListData {
  list: Active[]
  total: number
}

export interface CreateAdminActiveDto {
  name: string
  status: string
  progress: string
  price: number
  tag: string[]
  cover: string
  use_num: number
}

export interface UpdateAdminActiveDto {
  name?: string
  status?: string
  progress?: string
  price?: number
  tag?: string[]
  cover?: string
  use_num?: number
}

export interface ActiveIdData {
  id: string
}

export interface BindActiveDrawDto {
  draw_id: string
}

// 更新活动-奖品关联配置的 DTO（与后端约定的 UpdateActiveDrawDto 对齐）
export interface UpdateActiveDrawDto {
  total?: number
  probability?: number
  guarantee?: number
}
